<template>
    <el-form :model="formData" ref="form" :rules="rules" label-width="80px" :inline="false">
        <el-row :gutter="24">
            <el-col :span="12">
                <el-form-item label="用户名称">
                    <el-input v-model="formData.username"></el-input>
                </el-form-item>
            </el-col>

            <el-col :span="12">
                <el-form-item label="归属部门">
                    <el-select v-model="formData.department" placeholder="请选择">
                        <el-option label="部门一" value="1"></el-option>
                        <el-option label="部门二" value="2"></el-option>
                    </el-select>
                </el-form-item>
            </el-col>

            <el-col :span="12">
                <el-form-item label="手机号码">
                    <el-input v-model="formData.phone"></el-input>
                </el-form-item>
            </el-col>

            <el-col :span="12">
                <el-form-item label="邮箱">
                    <el-input v-model="formData.email"></el-input>
                </el-form-item>
            </el-col>

            <!-- 密码 -->
            <el-col :span="12">
                <el-form-item label="用户密码">
                    <el-input v-model="formData.password" type="password"></el-input>
                </el-form-item>
            </el-col>

            <!-- 性别 -->
            <el-col :span="12">
                <el-form-item label="用户性别">
                    <el-radio-group v-model="formData.sex">
                        <el-radio value="1">男</el-radio>
                        <el-radio value="2">女</el-radio>
                    </el-radio-group>
                </el-form-item>
            </el-col>

            <!-- 状态 -->
            <el-col :span="10">
                <el-form-item label="状态">
                    <el-radio-group v-model="formData.status">
                        <el-radio label="1">启用</el-radio>
                        <el-radio label="0">禁用</el-radio>
                    </el-radio-group>
                </el-form-item>
            </el-col>

            <el-col :span="12">
                <!-- 岗位 -->
                <el-form-item label="岗位">
                    <el-select v-model="formData.postId" placeholder="请选择">
                        <el-option label="部门一" value="1"></el-option>
                        <el-option label="部门二" value="2"></el-option>
                    </el-select>
                </el-form-item>
            </el-col>

            <el-col :span="12">
                <!-- 角色 -->
                <el-form-item label="角色">
                    <el-select v-model="formData.roleId" placeholder="请选择">
                        <el-option label="部门一" value="1"></el-option>
                        <el-option label="部门二" value="2"></el-option>
                    </el-select>
                </el-form-item>
            </el-col>


            <!-- 备注 -->
            <el-col :span="24">
                <el-form-item label="备注">
                    <el-input v-model="formData.remark" type="textarea" placeholder="请输入内容" :rows="3" />
                </el-form-item>
            </el-col>

            <el-form-item>
                <el-button type="primary" @click="onSubmit">立即创建</el-button>
                <el-button>取消</el-button>
            </el-form-item>
        </el-row>

    </el-form>



</template>

<script setup>
import { ref } from 'vue'
let formData = ref({})
</script>

<style scoped></style>
